package com.xl.singleinstance;

/**
 * @ClassDescription:
 * @JdkVersion: 1.8
 * @Author: lei·xie
 * @Created: 2024/3/15 0015 16:35
 */
public class A {

    //定义一个类变量
    private static A a = new A();

    //私有化构造方法
    private A() {
    }

    //定义一个类方法返回类的对象
    public static A getInstance() {
        return a;
    }

}
